#ifndef symSocket_h__
#define symSocket_h__
#include "../../inc/skyAdapter.h"
#include "../../inc/skyObject.h"
#include "../../inc/skyDelegate.h"
#ifdef _SYMBIAN
#include "./SIPExSocketEngine.h"

namespace Sky
{
	class OSSocket : public Object, public MSIPExSocketEngineObserver
	{
	public:
		typedef fastdelegate::FastDelegate2<const TUint8*, i32> DoneCallback;
	public:
		virtual void onReadDataDone( TPtrC8 aData )
		{
            _reading = vFalse;
			_rcb(aData.Ptr(),aData.Length());
		}
		virtual void onWriteDataDone( TPtrC8 aData )
		{		
            _writing = vFalse;
			_wcb(aData.Ptr(),aData.Length());
		}
	protected:
		CSIPExSocketEngine* _sockets;
		DoneCallback _rcb;
		DoneCallback _wcb;
        Bool _reading;
        Bool _writing;
	};
}
#endif
#endif
